/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
var count=0;
var prevFeed="";

window.onload = function() {
  
  for(var i=1;i<=5;i++){
//window.setTimeout(feedMaker("tartid","jaha är jag den enda som chattar efterhand?",i,"6ec86c"),3000); 
feedMaker("urban","hahahahahahahhahaahaha",i+10,"#6ec86c");
feedMaker("urban","hahahahahahahhahaahaha",i+60,"#6ec86c");
feedMaker("karin_den_gamle","wow dude",i+20,"#6262b3");
feedMaker("urban","hahahahahah",i+30,"#6ec86c");
 feedMaker("kronan63","I am seriously sick ojoefijosifdfjsdiosdifosidfijsdfoisjdofjojf this shit; every time I try to get any sense of resemblence of what the hell I'm supposed to do in a given situation, and in turn trying to make this just a bit longer, some asshat shows up and kicks my boat in. Were I to make this any longer, what, indeed would happen to the position of the first line?",i+40,"#ae9300");
feedMaker("urban","hahahiohohiohoihoihahahahahhahaahaha",i+50,"#6ec86c");
 }
 
  
};
function feedMaker(username,text,msgNumber,tagColor){
    count=text.length;
   var msg='<div id=message'+msgNumber+' class="shortMessage" style="width:'+(count*3+150)+'px; background-color:'+tagColor+'; border-color:'+tagColor+'; " ><div class="messageUsernameDiv" style="color:'+tagColor+';">'+username+'</div><br />'+text+'</div>';
//  alert('"message'+msgNumber+'"');
    var container=document.getElementById("mainFeedDiv");
    
    msg=prevFeed+msg; 

    container.innerHTML=msg; 
    
    prevFeed=msg;
}
            
